//
//  TMGProductTableViewCell.m
//  TMGold
//
//  Created by Mac on 2017/11/9.
//  Copyright © 2017年 tangmu. All rights reserved.
//

#import "TMGUserTableViewCell.h"
@interface TMGUserTableViewCell()
@property(nonatomic, strong) STLabel                     *phoneLable;
@property(nonatomic, strong) STLabel                     *timeLabel;
@property(nonatomic, strong) STLabel                     *desLabel;

@end
@implementation TMGUserTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)cellHeight{
    return 44;
}
#pragma mark --subView
- (void)configSubView{
    
    self.backgroundColor = [UIColor whiteColor];
    CGFloat lableWith = (UIScreenWidth - 30)/3;

    self.phoneLable = [[STLabel alloc] initWithFrame:CGRectMake(15, 0 ,lableWith, 44)
                                                    text:@"183804683213"
                                               textColor:TM_secendTextColor
                                                    font:14
                                             isSizetoFit:NO
                                           textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.phoneLable];
    
    
    self.timeLabel = [[STLabel alloc] initWithFrame:CGRectMake(self.phoneLable.right, 0 ,lableWith, 44)
                                                text:@"2017-12-13"
                                           textColor:TM_secendTextColor
                                                font:14
                                         isSizetoFit:NO
                                       textAlignment:NSTextAlignmentCenter];
    [self addSubview:self.timeLabel];
    
    
    self.desLabel = [[STLabel alloc] initWithFrame:CGRectMake(self.timeLabel.right, 0 ,lableWith, 44)
                                               text:@"购买成功"
                                          textColor:TM_secendTextColor
                                               font:14
                                        isSizetoFit:NO
                                      textAlignment:NSTextAlignmentRight];
    [self addSubview:self.desLabel];
    
}
- (void)setModel:(TMGBuyUserModel *)model{
    _model = model;
    self.timeLabel.text = model.create_at;
    
    self.phoneLable.text = model.mobile;
    
    self.desLabel.text = [NSString stringWithFormat:@"%@(元)",
                          model.price];
}
@end

